package pwd.allen.construct.composite.one;

import pwd.allen.construct.composite.one.Composite;
import pwd.allen.construct.composite.one.Leaf;

/**
 * @author 门那粒沙
 * @create 2021-05-22 14:48
 **/
public class Main {
    public static void main(String[] args) {
        Composite composite1 = new Composite();
        Composite composite2 = new Composite();
        composite1.add(new Leaf("a"));
        composite1.add(composite2);
        composite2.add(new Leaf("b"));
        composite2.add(new Leaf("c"));
        composite1.operation();
    }
}
